from django.db import models


class User(models.Model):
    id = models.AutoField(primary_key=True)
    username = models.CharField(max_length=30, unique=True,help_text="用户名")
    password = models.CharField(max_length=128,help_text="密码")
    phone = models.CharField(max_length=20,help_text="手机号")
    create_time = models.DateTimeField(auto_now_add=True,help_text="创建时间")
    update_time = models.DateTimeField(auto_now=True,help_text="修改时间")

    def __str__(self):
        return self.username
